Expression and Composition of Design Patterns with AspectJ

نویسندگان

  • Simon Denier
  • Pierre Cointe
چکیده

Design patterns are well-known couples of problems-solutions for software engineering. By nature, they often lack support from languages and this further complicates the study of their composition in the code. Aspect-oriented languages provide new mechanisms for modularization, which can help to improve design patterns implementation. (Hannemann et al., 2002) is the first extensive study of patterns aspectization with AspectJ. We notice some AspectJ idioms are needed in order to implement object relationships. We give a more reusable VISITOR pattern. We highlight a reusable composition of COMPOSITE and VISITOR patterns and expressive interactions of the OBSERVER pattern with a tree structure. We thus show that modularization by aspects helps composition of design patterns. RÉSUMÉ. Les motifs de conception sont des couples bien connus de problèmes-solutions pour l’ingénierie des programmes. Par nature ils ne sont pas supportés par les langages, ce qui complique l’étude de leur composition dans le code. Les langages d’aspects fournissent de nouveaux mécanismes de modularisation, qui peuvent aider à l’implémentation des motifs de conception. (Hannemann et al., 2002) est la première étude extensive de l’aspectisation des motifs avec AspectJ. Nous remarquons que AspectJ nécessite des idiomes afin de pouvoir implémenter les relations interobjets. Nous donnons une version plus réutilisable du motif VISITOR. Nous soulignons la composition réutilisable des motifs COMPOSITE et VISITOR, ainsi que des interactions expressives entre un motif OBSERVER et une structure en arbre. Nous montrons ainsi que la modularisation par les aspects facilite la composition des motifs de conception.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Mapping Composition Patterns to AspectJ and Hyper/J

In earlier work, we demonstrated the successful separation of the designs of crosscutting concerns into composition patterns [1]. In this paper, we demonstrate the mapping of crosscutting designs to two programming models that support similar approaches to separation within code—AspectJ [7] and Hyper/J [5]. We first illustrate the design of the Observer pattern using the composition pattern app...

متن کامل

Separating Crosscutting Concerns Across the Lifecycle: From Composition Patterns to AspectJ and Hyper/J

Requirements that have a crosscutting impact on software (such as distribution or persistence) present many problems for software development that manifest themselves throughout the lifecycle. Inherent properties of crosscutting requirements, such as scattering (where their support is scattered across multiple classes) and tangling (where their support is tangled with elements supporting other ...

متن کامل

Implementing design patterns in Object Teams

This paper presents a study of the support for modularity of Object Teams, an aspect-oriented language backwards compatible with Java. The study is based on implementations in Object Teams of two complete collections of the Gang-of-Four design patterns. An analysis of the implementations is provided, in terms of advantages of Object Teams over Java with respect to modularity, module composition...

متن کامل

A Sequence of Patterns for Reusable Aspect Libraries with Easy Configuration

Using well-known AspectJ idioms has been shown to increase the reusability of aspect libraries. Availability of such reusable libraries is an important motivating factor to drive the further adoption of AspectJ in industry and aspect-oriented-programming in general. Existing work, however, mostly presents the existing AspectJ idioms as relatively independent solutions. As experience grows in us...

متن کامل

Understanding Design Patterns Density with Aspects: A Case Study in JHotDraw using AspectJ

Design patterns offer solutions to common engineering problems in programs [1]. In particular, they shape the evolution of program elements. However, their implementations tend to vanish in the code: thus it is hard to spot them and to understand their impact. The problem becomes even more difficult with a “high density of pattern”: then the program becomes easy to evolve in the direction allow...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • L'OBJET

دوره 12  شماره 

صفحات  -

تاریخ انتشار 2006